﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Facebook.Service;
using Facebook.Service.Core;
using Facebook.Web;

/// <summary>
/// A static class with a few Facebook convenience methods and properties.
/// Although this duplicates the functionality of Facebook.NET, sometimes
/// we want to perform a simple operation that does not require a full
/// instance of the FacebookApplication control.
/// </summary>
public static class FacebookService
{
    /// <summary>
    /// The Facebook ID of the user making the current request.
    /// </summary>
    public static Int64 Uid
    {
        get
        {
            return Int64.Parse(System.Web.HttpContext.Current.Request.Params["fb_sig_user"]);
        }
    }

    /// <summary>
    /// The Facebook Session Key of the user making the current request.
    /// </summary>
    public static String SessionKey
    {
        get { return System.Web.HttpContext.Current.Request.Params["fb_sig_session_key"]; }
    }
}
